package com.chujian.client.wx;

import com.chujian.framework.constant.ChujianAppConst;
import com.chujian.framework.core.tsdata.Result;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = ChujianAppConst.WX_SERVICES_NAME, contextId = "WxMpTemplateMsgClient")
public interface WxMpTemplateMsgClient {

    /**
     * 发送模板消息
     *
     * @param message
     * @param appId
     * @return
     */
    @PostMapping("/mpTemplateMsg/sendTemplateMsg")
    Result<Boolean> sendTemplateMsg(@RequestBody WxMpTemplateMessage message, @RequestParam(value = "appId", required = false) String appId);

}
